<?php
/**
 * Created by PhpStorm.
 * User: 戎大富
 * Date: 2019/4/9
 * Time: 17:41
 * 用户统计
 */
namespace app\admin\controller;
use think\Db;
class Member extends Base {

    public function index(){
//        $where['user_status'] = array('neq',5);
        $count = Db::table('up_u_user')->count();

        //今日新增多少人
        $time2 =  date('Y-m-d 23:59:59');
        $time1 =  date('Y-m-d 00:00:01');
        $where1['user_time'] = array('between',array($time1,$time2));
        $count1 = Db::table('up_u_user')->where($where1)->count();
        //获取本月新增
        $time3 = date('Y-m');
        $count3 = Db::table('up_u_user')->where('user_y_m',$time3)->count();
        $info['count'] = $count;
        $info['count1'] = $count1;
        $info['count2'] = $count3;
        $this->assign('info',$info);
        return $this->fetch();
    }
}
